/* 基础布局 */
.wardrobe-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
}

/* 面包屑导航 */
.breadcrumb {
  margin-top: 80px;
  padding: 0.5rem 0;
}

.breadcrumb-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
}

.breadcrumb-content a {
  color: #64748b;
  text-decoration: none;
}

.breadcrumb-content a:hover {
  color: #0ea5e9;
}

/* 主容器 */
.wardrobe-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* 侧边栏 */
.sidebar {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  height: fit-content;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #64748b;
}

.category-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.category-item.active {
  background: #f0f9ff;
  color: #0ea5e9;
}

.category-count {
  margin-left: auto;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* 主内容区 */
.main-content {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 工具栏 */
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-bar {
  flex: 1;
}

/* 上传按钮样式 */
.upload-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-upload-button {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  border: none;
  color: white;
}

.custom-upload-button:hover {
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.custom-upload-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-text {
  font-size: 14px;
  font-weight: 500;
  color: white;
}

/* 衣物网格 */
.clothes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.clothes-item {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  max-width: 100%;
  aspect-ratio: 3/4;
}

.clothes-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.clothes-image {
  width: 100%;
  height: 65%;
  object-fit: contain;
  background-color: #f8fafc;
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.clothes-info {
  padding: 0.5rem;
  height: 35%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  min-height: 80px;
}

.clothes-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.clothes-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.clothes-category {
  font-size: 0.7rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  white-space: nowrap;
}

.clothes-date {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
}

.clothes-actions {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: all 0.3s;
}

.clothes-item:hover .clothes-actions {
  opacity: 1;
}

.action-button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.3s;
  font-size: 0.7rem;
}

.action-button:hover {
  background: #ffffff;
  color: #0ea5e9;
  transform: scale(1.1);
}

.action-button.delete:hover {
  color: #ef4444;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

/* 预览图片 */
.preview-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 1400px) {
  .breadcrumb-content,
  .wardrobe-container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 1200px) {
  .wardrobe-container {
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding: 0 1.25rem;
  }
}

@media (max-width: 768px) {
  .breadcrumb {
    margin-top: 60px;
  }

  .breadcrumb-content,
  .wardrobe-container {
    padding: 0 1rem;
  }

  .wardrobe-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem auto;
  }

  .toolbar {
    flex-direction: column;
  }

  .clothes-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .wardrobe-container {
    padding: 0 0.75rem;
  }

  .toolbar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-bar {
    max-width: 100%;
    width: 100%;
  }

  .upload-button {
    width: 100%;
    justify-content: center;
  }

  .clothes-info {
    padding: 0.4rem;
    min-height: 70px;
  }

  .clothes-name {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .clothes-category,
  .clothes-date {
    font-size: 0.65rem;
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #64748b;
  padding: 2rem;
  text-align: center;
  width: 100%;
  min-height: 300px;
}
